package com.hc.oauthresources.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.security.RolesAllowed;

@RestController
@RequestMapping("project")
public class ProjectController {

    @RequestMapping("findAll")
    @RolesAllowed("PROJECT")
    public String findAll(){
        //Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
        return "project";
    }

    @GetMapping
    public String getString(String str) {
        return str;
    }
}
